adding required packages

library(ggmap)
## Loading required package: ggplot2
## Google Maps API Terms of Service: http://developers.google.com/maps/terms.
## Please cite ggmap if you use it: see citation("ggmap") for details.
library(tidyverse)
## 
## √ tibble  1.4.2     √ purrr   0.2.4
## √ tidyr   0.8.0     √ dplyr   0.7.4
## √ readr   1.1.1     √ stringr 1.3.0
## √ tibble  1.4.2     √ forcats 0.3.0
## 
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(maps)
## 
## Attaching package: 'maps'
## The following object is masked from 'package:purrr':
## 
##     map
library(mapproj)

Different Types of Maps

Road map of Bude

map.1 <- get_map(location = c(-4.5413, 50.82435), zoom = 14, maptype = "roadmap")
## Source : https://maps.googleapis.com/maps/api/staticmap?center=50.82435,-4.5413&zoom=14&size=640x640&scale=2&maptype=roadmap&language=en-EN
ggmap(map.1)

Water color map of Bude

map.2 <- get_map(location = c(-4.5413, 50.82435), zoom = 14, maptype = "watercolor")
## maptype = "watercolor" is only available with source = "stamen".
## resetting to source = "stamen"...
## Source : https://maps.googleapis.com/maps/api/staticmap?center=50.82435,-4.5413&zoom=14&size=640x640&scale=2&maptype=terrain
## Source : http://tile.stamen.com/watercolor/14/7984/5496.jpg
## Source : http://tile.stamen.com/watercolor/14/7985/5496.jpg
## Source : http://tile.stamen.com/watercolor/14/7986/5496.jpg
## Source : http://tile.stamen.com/watercolor/14/7984/5497.jpg
## Source : http://tile.stamen.com/watercolor/14/7985/5497.jpg
## Source : http://tile.stamen.com/watercolor/14/7986/5497.jpg
## Source : http://tile.stamen.com/watercolor/14/7984/5498.jpg
## Source : http://tile.stamen.com/watercolor/14/7985/5498.jpg
## Source : http://tile.stamen.com/watercolor/14/7986/5498.jpg
ggmap(map.2)

Locations

Map of all locations

Key: red- Bude North Cornwall Cricket Club blue- Crooklets Beach green- Summerleaze Beach yellow- Crooklets Inn (pub) purple- Edgcumbe Hotel gray- LSG House Hotel

regular map
# Change by Hongyi He
# Add two hotel
# hotel 1
Edgcumbe_Hotel <- geocode("19 Summerleaze Cres, Bude EX23 8HJ, UK")
## Source : https://maps.googleapis.com/maps/api/geocode/json?address=19%20Summerleaze%20Cres%2C%20Bude%20EX23%208HJ%2C%20UK
# hotel 2
LSG_House <- geocode("7 Burn View, Bude EX23 8BY, UK")
## Source : https://maps.googleapis.com/maps/api/geocode/json?address=7%20Burn%20View%2C%20Bude%20EX23%208BY%2C%20UK
ggmap(map.1) +
  geom_point(
    aes(x = -4.552577, y = 50.83386),
    color = "red", size = 3
  ) +
  geom_point(
    aes(x = -4.553923, y = 50.83613),
    color = "blue", size = 3
  ) +
  geom_point(
    aes(x = -4.551326, y = 50.83099),
    color = "green", size = 3
  ) +
  geom_point(
    aes(x = -4.551132, y = 50.83597),
    color = "yellow", size = 3
  ) +
  geom_point(
    aes(x = -4.548689, y = 50.83139),
    color = "purple", size = 3
  ) +
  geom_point(
    aes(x = -4.544691, y = 50.83184),
    color = "gray", size = 3
  )

water color map
ggmap(map.2) +
  geom_point(
    aes(x = -4.552577, y = 50.83386),
    color = "red", size = 3
  ) +
  geom_point(
    aes(x = -4.553923, y = 50.83613),
    color = "blue", size = 3
  ) +
  geom_point(
    aes(x = -4.551326, y = 50.83099),
    color = "green", size = 3
  ) +
  geom_point(
    aes(x = -4.551132, y = 50.83597),
    color = "yellow", size = 3
  ) +
  geom_point(
    aes(x = -4.548689, y = 50.83139),
    color = "purple", size = 3
  ) +
  geom_point(
    aes(x = -4.544691, y = 50.83184),
    color = "gray", size = 3
  )

Route from the cricket club to the pub

regular map
from <- "Crooklets Inn"
to <- "Bude North Cornwall Cricket Club"
route_df <- route(from, to, structure = "route")
## Source : https://maps.googleapis.com/maps/api/directions/json?origin=Crooklets%20Inn&destination=Bude%20North%20Cornwall%20Cricket%20Club&mode=driving&units=metric&alternatives=false
ggmap(map.1) +  
  geom_path(
    aes(x = lon, y = lat), colour = "red", size = 1.5,
    data = route_df, lineend = "round"
  )

water color map
from <- "Crooklet's Inn"
to <- "Bude North Cornwall Cricket Club"
route_df <- route(from, to, structure = "route")
## Source : https://maps.googleapis.com/maps/api/directions/json?origin=Crooklet%27s%20Inn&destination=Bude%20North%20Cornwall%20Cricket%20Club&mode=driving&units=metric&alternatives=false
ggmap(map.2) +  
  geom_path(
    aes(x = lon, y = lat), colour = "red", size = 1.5,
    data = route_df, lineend = "round"
  )

Images

Bude North Cornwall Cricket Club

Bude North Cornwall Cricket Club

Crooklet’s Beach

Crooklet’s Beach

Summerleaze Beach

Summerleaze Beach

Edgcumbe Hotel

Edgcumbe Hotel

LSG House

LSG House